/**
 * The MIT License (MIT)
 *
 * Copyright (c) 2018-2019 Erik Moqvist
 *
 * Permission is hereby granted, free of charge, to any person
 * obtaining a copy of this software and associated documentation
 * files (the "Software"), to deal in the Software without
 * restriction, including without limitation the rights to use, copy,
 * modify, merge, publish, distribute, sublicense, and/or sell copies
 * of the Software, and to permit persons to whom the Software is
 * furnished to do so, subject to the following conditions:
 *
 * The above copyright notice and this permission notice shall be
 * included in all copies or substantial portions of the Software.
 *
 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
 * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
 * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
 * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
 * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
 * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
 * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
 * SOFTWARE.
 */

/**
 * This file was generated by asn1tools version 0.166.0 Sat Oct 21 09:45:15 2023.
 */

#ifndef UPER_H
#define UPER_H

#include <stdint.h>
#include <stdbool.h>
#include <unistd.h>

#ifndef ENOMEM
#    define ENOMEM 12
#endif

#ifndef EINVAL
#    define EINVAL 22
#endif

#ifndef EOUTOFDATA
#    define EOUTOFDATA 500
#endif

#ifndef EBADCHOICE
#    define EBADCHOICE 501
#endif

#ifndef EBADLENGTH
#    define EBADLENGTH 502
#endif

#ifndef EBADENUM
#    define EBADENUM 503
#endif

/**
 * Type A in module CSource.
 */
struct uper_c_source_a_t {
    int8_t a;
    int16_t b;
    int32_t c;
    int64_t d;
    uint8_t e;
    uint16_t f;
    uint32_t g;
    uint64_t h;
    bool i;
    struct {
        uint8_t buf[11];
    } j;
};

/**
 * Type AB in module CSource.
 */
struct uper_c_source_ab_t {
    int8_t a;
    uint16_t b;
};

/**
 * Type Q in module CSource.
 */
enum uper_c_source_q_choice_e {
    uper_c_source_q_choice_c001_e,
    uper_c_source_q_choice_c002_e,
    uper_c_source_q_choice_c003_e,
    uper_c_source_q_choice_c004_e,
    uper_c_source_q_choice_c005_e,
    uper_c_source_q_choice_c006_e,
    uper_c_source_q_choice_c007_e,
    uper_c_source_q_choice_c008_e,
    uper_c_source_q_choice_c009_e,
    uper_c_source_q_choice_c010_e,
    uper_c_source_q_choice_c011_e,
    uper_c_source_q_choice_c012_e,
    uper_c_source_q_choice_c013_e,
    uper_c_source_q_choice_c014_e,
    uper_c_source_q_choice_c015_e,
    uper_c_source_q_choice_c016_e,
    uper_c_source_q_choice_c017_e,
    uper_c_source_q_choice_c018_e,
    uper_c_source_q_choice_c019_e,
    uper_c_source_q_choice_c020_e,
    uper_c_source_q_choice_c021_e,
    uper_c_source_q_choice_c022_e,
    uper_c_source_q_choice_c023_e,
    uper_c_source_q_choice_c024_e,
    uper_c_source_q_choice_c025_e,
    uper_c_source_q_choice_c026_e,
    uper_c_source_q_choice_c027_e,
    uper_c_source_q_choice_c028_e,
    uper_c_source_q_choice_c029_e,
    uper_c_source_q_choice_c030_e,
    uper_c_source_q_choice_c031_e,
    uper_c_source_q_choice_c032_e,
    uper_c_source_q_choice_c033_e,
    uper_c_source_q_choice_c034_e,
    uper_c_source_q_choice_c035_e,
    uper_c_source_q_choice_c036_e,
    uper_c_source_q_choice_c037_e,
    uper_c_source_q_choice_c038_e,
    uper_c_source_q_choice_c039_e,
    uper_c_source_q_choice_c040_e,
    uper_c_source_q_choice_c041_e,
    uper_c_source_q_choice_c042_e,
    uper_c_source_q_choice_c043_e,
    uper_c_source_q_choice_c044_e,
    uper_c_source_q_choice_c045_e,
    uper_c_source_q_choice_c046_e,
    uper_c_source_q_choice_c047_e,
    uper_c_source_q_choice_c048_e,
    uper_c_source_q_choice_c049_e,
    uper_c_source_q_choice_c050_e,
    uper_c_source_q_choice_c051_e,
    uper_c_source_q_choice_c052_e,
    uper_c_source_q_choice_c053_e,
    uper_c_source_q_choice_c054_e,
    uper_c_source_q_choice_c055_e,
    uper_c_source_q_choice_c056_e,
    uper_c_source_q_choice_c057_e,
    uper_c_source_q_choice_c058_e,
    uper_c_source_q_choice_c059_e,
    uper_c_source_q_choice_c060_e,
    uper_c_source_q_choice_c061_e,
    uper_c_source_q_choice_c062_e,
    uper_c_source_q_choice_c063_e,
    uper_c_source_q_choice_c064_e,
    uper_c_source_q_choice_c065_e,
    uper_c_source_q_choice_c066_e,
    uper_c_source_q_choice_c067_e,
    uper_c_source_q_choice_c068_e,
    uper_c_source_q_choice_c069_e,
    uper_c_source_q_choice_c070_e,
    uper_c_source_q_choice_c071_e,
    uper_c_source_q_choice_c072_e,
    uper_c_source_q_choice_c073_e,
    uper_c_source_q_choice_c074_e,
    uper_c_source_q_choice_c075_e,
    uper_c_source_q_choice_c076_e,
    uper_c_source_q_choice_c077_e,
    uper_c_source_q_choice_c078_e,
    uper_c_source_q_choice_c079_e,
    uper_c_source_q_choice_c080_e,
    uper_c_source_q_choice_c081_e,
    uper_c_source_q_choice_c082_e,
    uper_c_source_q_choice_c083_e,
    uper_c_source_q_choice_c084_e,
    uper_c_source_q_choice_c085_e,
    uper_c_source_q_choice_c086_e,
    uper_c_source_q_choice_c087_e,
    uper_c_source_q_choice_c088_e,
    uper_c_source_q_choice_c089_e,
    uper_c_source_q_choice_c090_e,
    uper_c_source_q_choice_c091_e,
    uper_c_source_q_choice_c092_e,
    uper_c_source_q_choice_c093_e,
    uper_c_source_q_choice_c094_e,
    uper_c_source_q_choice_c095_e,
    uper_c_source_q_choice_c096_e,
    uper_c_source_q_choice_c097_e,
    uper_c_source_q_choice_c098_e,
    uper_c_source_q_choice_c099_e,
    uper_c_source_q_choice_c100_e,
    uper_c_source_q_choice_c101_e,
    uper_c_source_q_choice_c102_e,
    uper_c_source_q_choice_c103_e,
    uper_c_source_q_choice_c104_e,
    uper_c_source_q_choice_c105_e,
    uper_c_source_q_choice_c106_e,
    uper_c_source_q_choice_c107_e,
    uper_c_source_q_choice_c108_e,
    uper_c_source_q_choice_c109_e,
    uper_c_source_q_choice_c110_e,
    uper_c_source_q_choice_c111_e,
    uper_c_source_q_choice_c112_e,
    uper_c_source_q_choice_c113_e,
    uper_c_source_q_choice_c114_e,
    uper_c_source_q_choice_c115_e,
    uper_c_source_q_choice_c116_e,
    uper_c_source_q_choice_c117_e,
    uper_c_source_q_choice_c118_e,
    uper_c_source_q_choice_c119_e,
    uper_c_source_q_choice_c120_e,
    uper_c_source_q_choice_c121_e,
    uper_c_source_q_choice_c122_e,
    uper_c_source_q_choice_c123_e,
    uper_c_source_q_choice_c124_e,
    uper_c_source_q_choice_c125_e,
    uper_c_source_q_choice_c126_e,
    uper_c_source_q_choice_c127_e,
    uper_c_source_q_choice_c128_e,
    uper_c_source_q_choice_c129_e,
    uper_c_source_q_choice_c130_e,
    uper_c_source_q_choice_c131_e,
    uper_c_source_q_choice_c132_e,
    uper_c_source_q_choice_c133_e,
    uper_c_source_q_choice_c134_e,
    uper_c_source_q_choice_c135_e,
    uper_c_source_q_choice_c136_e,
    uper_c_source_q_choice_c137_e,
    uper_c_source_q_choice_c138_e,
    uper_c_source_q_choice_c139_e,
    uper_c_source_q_choice_c140_e,
    uper_c_source_q_choice_c141_e,
    uper_c_source_q_choice_c142_e,
    uper_c_source_q_choice_c143_e,
    uper_c_source_q_choice_c144_e,
    uper_c_source_q_choice_c145_e,
    uper_c_source_q_choice_c146_e,
    uper_c_source_q_choice_c147_e,
    uper_c_source_q_choice_c148_e,
    uper_c_source_q_choice_c149_e,
    uper_c_source_q_choice_c150_e,
    uper_c_source_q_choice_c151_e,
    uper_c_source_q_choice_c152_e,
    uper_c_source_q_choice_c153_e,
    uper_c_source_q_choice_c154_e,
    uper_c_source_q_choice_c155_e,
    uper_c_source_q_choice_c156_e,
    uper_c_source_q_choice_c157_e,
    uper_c_source_q_choice_c158_e,
    uper_c_source_q_choice_c159_e,
    uper_c_source_q_choice_c160_e,
    uper_c_source_q_choice_c161_e,
    uper_c_source_q_choice_c162_e,
    uper_c_source_q_choice_c163_e,
    uper_c_source_q_choice_c164_e,
    uper_c_source_q_choice_c165_e,
    uper_c_source_q_choice_c166_e,
    uper_c_source_q_choice_c167_e,
    uper_c_source_q_choice_c168_e,
    uper_c_source_q_choice_c169_e,
    uper_c_source_q_choice_c170_e,
    uper_c_source_q_choice_c171_e,
    uper_c_source_q_choice_c172_e,
    uper_c_source_q_choice_c173_e,
    uper_c_source_q_choice_c174_e,
    uper_c_source_q_choice_c175_e,
    uper_c_source_q_choice_c176_e,
    uper_c_source_q_choice_c177_e,
    uper_c_source_q_choice_c178_e,
    uper_c_source_q_choice_c179_e,
    uper_c_source_q_choice_c180_e,
    uper_c_source_q_choice_c181_e,
    uper_c_source_q_choice_c182_e,
    uper_c_source_q_choice_c183_e,
    uper_c_source_q_choice_c184_e,
    uper_c_source_q_choice_c185_e,
    uper_c_source_q_choice_c186_e,
    uper_c_source_q_choice_c187_e,
    uper_c_source_q_choice_c188_e,
    uper_c_source_q_choice_c189_e,
    uper_c_source_q_choice_c190_e,
    uper_c_source_q_choice_c191_e,
    uper_c_source_q_choice_c192_e,
    uper_c_source_q_choice_c193_e,
    uper_c_source_q_choice_c194_e,
    uper_c_source_q_choice_c195_e,
    uper_c_source_q_choice_c196_e,
    uper_c_source_q_choice_c197_e,
    uper_c_source_q_choice_c198_e,
    uper_c_source_q_choice_c199_e,
    uper_c_source_q_choice_c200_e,
    uper_c_source_q_choice_c201_e,
    uper_c_source_q_choice_c202_e,
    uper_c_source_q_choice_c203_e,
    uper_c_source_q_choice_c204_e,
    uper_c_source_q_choice_c205_e,
    uper_c_source_q_choice_c206_e,
    uper_c_source_q_choice_c207_e,
    uper_c_source_q_choice_c208_e,
    uper_c_source_q_choice_c209_e,
    uper_c_source_q_choice_c210_e,
    uper_c_source_q_choice_c211_e,
    uper_c_source_q_choice_c212_e,
    uper_c_source_q_choice_c213_e,
    uper_c_source_q_choice_c214_e,
    uper_c_source_q_choice_c215_e,
    uper_c_source_q_choice_c216_e,
    uper_c_source_q_choice_c217_e,
    uper_c_source_q_choice_c218_e,
    uper_c_source_q_choice_c219_e,
    uper_c_source_q_choice_c220_e,
    uper_c_source_q_choice_c221_e,
    uper_c_source_q_choice_c222_e,
    uper_c_source_q_choice_c223_e,
    uper_c_source_q_choice_c224_e,
    uper_c_source_q_choice_c225_e,
    uper_c_source_q_choice_c226_e,
    uper_c_source_q_choice_c227_e,
    uper_c_source_q_choice_c228_e,
    uper_c_source_q_choice_c229_e,
    uper_c_source_q_choice_c230_e,
    uper_c_source_q_choice_c231_e,
    uper_c_source_q_choice_c232_e,
    uper_c_source_q_choice_c233_e,
    uper_c_source_q_choice_c234_e,
    uper_c_source_q_choice_c235_e,
    uper_c_source_q_choice_c236_e,
    uper_c_source_q_choice_c237_e,
    uper_c_source_q_choice_c238_e,
    uper_c_source_q_choice_c239_e,
    uper_c_source_q_choice_c240_e,
    uper_c_source_q_choice_c241_e,
    uper_c_source_q_choice_c242_e,
    uper_c_source_q_choice_c243_e,
    uper_c_source_q_choice_c244_e,
    uper_c_source_q_choice_c245_e,
    uper_c_source_q_choice_c246_e,
    uper_c_source_q_choice_c247_e,
    uper_c_source_q_choice_c248_e,
    uper_c_source_q_choice_c249_e,
    uper_c_source_q_choice_c250_e,
    uper_c_source_q_choice_c251_e,
    uper_c_source_q_choice_c252_e,
    uper_c_source_q_choice_c253_e,
    uper_c_source_q_choice_c254_e,
    uper_c_source_q_choice_c255_e,
    uper_c_source_q_choice_c256_e,
    uper_c_source_q_choice_c257_e
};

struct uper_c_source_q_t {
    enum uper_c_source_q_choice_e choice;
    union {
        bool c001;
        bool c002;
        bool c003;
        bool c004;
        bool c005;
        bool c006;
        bool c007;
        bool c008;
        bool c009;
        bool c010;
        bool c011;
        bool c012;
        bool c013;
        bool c014;
        bool c015;
        bool c016;
        bool c017;
        bool c018;
        bool c019;
        bool c020;
        bool c021;
        bool c022;
        bool c023;
        bool c024;
        bool c025;
        bool c026;
        bool c027;
        bool c028;
        bool c029;
        bool c030;
        bool c031;
        bool c032;
        bool c033;
        bool c034;
        bool c035;
        bool c036;
        bool c037;
        bool c038;
        bool c039;
        bool c040;
        bool c041;
        bool c042;
        bool c043;
        bool c044;
        bool c045;
        bool c046;
        bool c047;
        bool c048;
        bool c049;
        bool c050;
        bool c051;
        bool c052;
        bool c053;
        bool c054;
        bool c055;
        bool c056;
        bool c057;
        bool c058;
        bool c059;
        bool c060;
        bool c061;
        bool c062;
        bool c063;
        bool c064;
        bool c065;
        bool c066;
        bool c067;
        bool c068;
        bool c069;
        bool c070;
        bool c071;
        bool c072;
        bool c073;
        bool c074;
        bool c075;
        bool c076;
        bool c077;
        bool c078;
        bool c079;
        bool c080;
        bool c081;
        bool c082;
        bool c083;
        bool c084;
        bool c085;
        bool c086;
        bool c087;
        bool c088;
        bool c089;
        bool c090;
        bool c091;
        bool c092;
        bool c093;
        bool c094;
        bool c095;
        bool c096;
        bool c097;
        bool c098;
        bool c099;
        bool c100;
        bool c101;
        bool c102;
        bool c103;
        bool c104;
        bool c105;
        bool c106;
        bool c107;
        bool c108;
        bool c109;
        bool c110;
        bool c111;
        bool c112;
        bool c113;
        bool c114;
        bool c115;
        bool c116;
        bool c117;
        bool c118;
        bool c119;
        bool c120;
        bool c121;
        bool c122;
        bool c123;
        bool c124;
        bool c125;
        bool c126;
        bool c127;
        bool c128;
        bool c129;
        bool c130;
        bool c131;
        bool c132;
        bool c133;
        bool c134;
        bool c135;
        bool c136;
        bool c137;
        bool c138;
        bool c139;
        bool c140;
        bool c141;
        bool c142;
        bool c143;
        bool c144;
        bool c145;
        bool c146;
        bool c147;
        bool c148;
        bool c149;
        bool c150;
        bool c151;
        bool c152;
        bool c153;
        bool c154;
        bool c155;
        bool c156;
        bool c157;
        bool c158;
        bool c159;
        bool c160;
        bool c161;
        bool c162;
        bool c163;
        bool c164;
        bool c165;
        bool c166;
        bool c167;
        bool c168;
        bool c169;
        bool c170;
        bool c171;
        bool c172;
        bool c173;
        bool c174;
        bool c175;
        bool c176;
        bool c177;
        bool c178;
        bool c179;
        bool c180;
        bool c181;
        bool c182;
        bool c183;
        bool c184;
        bool c185;
        bool c186;
        bool c187;
        bool c188;
        bool c189;
        bool c190;
        bool c191;
        bool c192;
        bool c193;
        bool c194;
        bool c195;
        bool c196;
        bool c197;
        bool c198;
        bool c199;
        bool c200;
        bool c201;
        bool c202;
        bool c203;
        bool c204;
        bool c205;
        bool c206;
        bool c207;
        bool c208;
        bool c209;
        bool c210;
        bool c211;
        bool c212;
        bool c213;
        bool c214;
        bool c215;
        bool c216;
        bool c217;
        bool c218;
        bool c219;
        bool c220;
        bool c221;
        bool c222;
        bool c223;
        bool c224;
        bool c225;
        bool c226;
        bool c227;
        bool c228;
        bool c229;
        bool c230;
        bool c231;
        bool c232;
        bool c233;
        bool c234;
        bool c235;
        bool c236;
        bool c237;
        bool c238;
        bool c239;
        bool c240;
        bool c241;
        bool c242;
        bool c243;
        bool c244;
        bool c245;
        bool c246;
        bool c247;
        bool c248;
        bool c249;
        bool c250;
        bool c251;
        bool c252;
        bool c253;
        bool c254;
        bool c255;
        bool c256;
        bool c257;
    } value;
};

/**
 * Type D in module CSource.
 */
enum uper_c_source_d_a_b_choice_e {
    uper_c_source_d_a_b_choice_c_e,
    uper_c_source_d_a_b_choice_d_e
};

enum uper_c_source_d_g_h_e {
    uper_c_source_d_g_h_i_e = 0,
    uper_c_source_d_g_h_j_e = 4,
    uper_c_source_d_g_h_k_e = 512
};

struct uper_c_source_d_t {
    uint8_t length;
    struct {
        struct {
            struct {
                enum uper_c_source_d_a_b_choice_e choice;
                union {
                    uint8_t c;
                    bool d;
                } value;
            } b;
            struct {
                uint8_t length;
            } e;
        } a;
        struct {
            enum uper_c_source_d_g_h_e h;
            struct {
                uint8_t length;
                uint8_t buf[2];
            } l;
        } g;
        struct {
            bool is_n_present;
            bool n;
            int8_t o;
            bool is_p_present;
            struct {
                struct {
                    uint8_t buf[5];
                } q;
                bool is_r_present;
                bool r;
            } p;
            bool s;
        } m;
    } elements[10];
};

/**
 * Type AC in module CSource.
 */
struct uper_c_source_ac_t {
    struct uper_c_source_q_t a;
    struct uper_c_source_d_t b;
};

/**
 * Type AD in module CSource.
 */
enum uper_c_source_ad_e {
    uper_c_source_ad_a_e = 0,
    uper_c_source_ad_b_e = 1
};

struct uper_c_source_ad_t {
    enum uper_c_source_ad_e value;
};

/**
 * Type AE in module CSource.
 */
struct uper_c_source_ae_t {
    bool is_a_present;
    bool a;
    bool b;
    bool c;
};

/**
 * Type AH in module CSource.
 */
enum uper_c_source_ah_e_e {
    uper_c_source_ah_e_f_e = 0,
    uper_c_source_ah_e_g_e = 1,
    uper_c_source_ah_e_h_e = 2
};

struct uper_c_source_ah_t {
    bool c;
    bool is_d_addition_present;
    uint8_t d;
    bool is_e_addition_present;
    enum uper_c_source_ah_e_e e;
};

/**
 * Type AF in module CSource.
 */
struct uper_c_source_af_t {
    bool a;
    bool is_b_addition_present;
    struct uper_c_source_ah_t b;
    bool is_e_addition_present;
    uint8_t e;
    bool is_f_addition_present;
    uint8_t f;
    bool is_g_addition_present;
    uint8_t g;
    bool is_h_addition_present;
    uint8_t h;
    bool is_i_addition_present;
    uint8_t i;
    bool is_j_addition_present;
    uint8_t j;
    bool is_k_addition_present;
    uint8_t k;
    bool is_l_addition_present;
    uint8_t l;
};

/**
 * Type AG in module CSource.
 */
enum uper_c_source_ag_d_e {
    uper_c_source_ag_d_e_e = 0,
    uper_c_source_ag_d_f_e = 256,
    uper_c_source_ag_d_g_e = 65536
};

enum uper_c_source_ag_j_choice_e {
    uper_c_source_ag_j_choice_k_e,
    uper_c_source_ag_j_choice_l_e
};

struct uper_c_source_ag_t {
    bool a;
    bool is_b_addition_present;
    struct {
        uint8_t length;
        uint8_t buf[10];
    } b;
    bool is_c_addition_present;
    struct {
        uint8_t length;
        bool elements[10];
    } c;
    bool is_d_addition_present;
    enum uper_c_source_ag_d_e d;
    bool is_h_addition_present;
    bool is_i_addition_present;
    bool is_j_addition_present;
    struct {
        enum uper_c_source_ag_j_choice_e choice;
        union {
            uint16_t k;
            bool l;
        } value;
    } j;
    bool is_m_addition_present;
    struct {
        uint8_t buf[5];
    } m;
};

/**
 * Type AJ in module CSource.
 */
enum uper_c_source_aj_a_e {
    uper_c_source_aj_a_a_1_e = 0,
    uper_c_source_aj_a_a_2_e = 1
};

struct uper_c_source_aj_t {
    enum uper_c_source_aj_a_e a;
};

/**
 * Type AK in module CSource.
 */
enum uper_c_source_ak_choice_e {
    uper_c_source_ak_choice_a_e
};

struct uper_c_source_ak_t {
    enum uper_c_source_ak_choice_e choice;
    union {
        struct uper_c_source_aj_t a;
    } value;
};

/**
 * Type AI in module CSource.
 */
struct uper_c_source_ai_t {
    struct uper_c_source_ak_t a;
};

/**
 * Type AL in module CSource.
 */
struct uper_c_source_al_t {
    int16_t value;
};

/**
 * Type AM in module CSource.
 */
struct uper_c_source_am_t {
    int8_t value;
};

/**
 * Type AN in module CSource.
 */
enum uper_c_source_an_e {
    uper_c_source_an_a_e = -16777216,
    uper_c_source_an_b_e = -8388608,
    uper_c_source_an_c_e = -65536,
    uper_c_source_an_d_e = -32768,
    uper_c_source_an_e_e = -128,
    uper_c_source_an_f_e = 0,
    uper_c_source_an_g_e = 127,
    uper_c_source_an_h_e = 128,
    uper_c_source_an_i_e = 32767,
    uper_c_source_an_j_e = 65536,
    uper_c_source_an_k_e = 16777216
};

struct uper_c_source_an_t {
    enum uper_c_source_an_e value;
};

/**
 * Type AO in module CSource.
 */
static const uint8_t UPER_C_SOURCE_AO_A_A = 0x80;
static const uint8_t UPER_C_SOURCE_AO_A_B = 0x40;
static const uint8_t UPER_C_SOURCE_AO_A_C = 0x1;
static const uint32_t UPER_C_SOURCE_AO_B_A = 0x800000;
static const uint32_t UPER_C_SOURCE_AO_B_B = 0x400000;
static const uint32_t UPER_C_SOURCE_AO_B_C = 0x1;
static const uint32_t UPER_C_SOURCE_AO_D_A = 0x40000000;
static const uint32_t UPER_C_SOURCE_AO_D_B = 0x20000000;
static const uint32_t UPER_C_SOURCE_AO_D_C = 0x1;
static const uint64_t UPER_C_SOURCE_AO_E_A = 0x4000000000000000;
static const uint64_t UPER_C_SOURCE_AO_E_B = 0x80000000;
static const uint64_t UPER_C_SOURCE_AO_E_C = 0x01;
struct uper_c_source_ao_t {
    uint8_t a;
    uint32_t b;
    uint8_t c;
    uint32_t d;
    uint64_t e;
};

/**
 * Type REFERENCED-SEQUENCE in module CRef.
 */
struct uper_c_ref_referenced_sequence_t {
    uint8_t a;
};

/**
 * Type REFERENCED-ENUM in module CRef.
 */
enum uper_c_ref_referenced_enum_e {
    uper_c_ref_referenced_enum_a_e = 0,
    uper_c_ref_referenced_enum_b_e = 1,
    uper_c_ref_referenced_enum_c_e = 2
};

struct uper_c_ref_referenced_enum_t {
    enum uper_c_ref_referenced_enum_e value;
};

/**
 * Type AP in module CSource.
 */
struct uper_c_source_ap_t {
    struct uper_c_ref_referenced_sequence_t b;
    struct uper_c_ref_referenced_enum_t c;
    uint8_t d;
};

/**
 * Type AQ in module CSource.
 */
struct uper_c_source_aq_t {
    uint32_t value;
};

/**
 * Type AR in module CSource.
 */
struct uper_c_source_ar_t {
    struct {
        uint8_t length;
        uint8_t buf[10];
    } a;
};

/**
 * Type AS in module CSource.
 */
enum uper_c_source_as_a_b_choice_e {
    uper_c_source_as_a_b_choice_b_a_e,
    uper_c_source_as_a_b_choice_b_b_e
};

struct uper_c_source_as_t {
    bool is_a_a_present;
    bool a_a;
    struct {
        enum uper_c_source_as_a_b_choice_e choice;
        union {
            bool b_a;
            bool b_b;
        } value;
    } a_b;
    bool a_c;
};

/**
 * Type AT in module CRef.
 */
struct uper_c_ref_at_t {
    uint8_t value;
};

/**
 * Type AT in module CSource.
 */
struct uper_c_source_at_t {
    uint8_t a;
    bool is_b_addition_present;
    struct {
        uint8_t length;
        struct uper_c_source_a_t elements[32];
    } b;
};

/**
 * Type AU in module CRef.
 */
enum uper_c_ref_au_a_a_b_a_e {
    uper_c_ref_au_a_a_b_a_a_e = 0,
    uper_c_ref_au_a_a_b_a_b_e = 1
};

enum uper_c_ref_au_a_a_b_b_e {
    uper_c_ref_au_a_a_b_b_a_e = 0,
    uper_c_ref_au_a_a_b_b_b_e = 1
};

enum uper_c_ref_au_a_a_choice_e {
    uper_c_ref_au_a_a_choice_b_a_e,
    uper_c_ref_au_a_a_choice_b_b_e
};

struct uper_c_ref_au_t {
    struct {
        enum uper_c_ref_au_a_a_choice_e choice;
        union {
            enum uper_c_ref_au_a_a_b_a_e b_a;
            enum uper_c_ref_au_a_a_b_b_e b_b;
        } value;
    } a_a;
};

/**
 * Type B in module CSource.
 */
enum uper_c_source_b_choice_e {
    uper_c_source_b_choice_a_e,
    uper_c_source_b_choice_b_e,
    uper_c_source_b_choice_c_e
};

struct uper_c_source_b_t {
    enum uper_c_source_b_choice_e choice;
    union {
        int8_t a;
        struct uper_c_source_a_t b;
    } value;
};

/**
 * Type C in module CSource.
 */
struct uper_c_source_c_t {
    uint8_t length;
    struct uper_c_source_b_t elements[2];
};

/**
 * Type E in module CSource.
 */
enum uper_c_source_e_a_b_choice_e {
    uper_c_source_e_a_b_choice_c_e
};

enum uper_c_source_e_a_choice_e {
    uper_c_source_e_a_choice_b_e
};

struct uper_c_source_e_t {
    struct {
        enum uper_c_source_e_a_choice_e choice;
        union {
            struct {
                enum uper_c_source_e_a_b_choice_e choice;
                union {
                    bool c;
                } value;
            } b;
        } value;
    } a;
};

/**
 * Type F in module CSource.
 */
struct uper_c_source_f_t {
    uint8_t length;
    struct {
        bool elements[1];
    } elements[2];
};

/**
 * Type G in module CSource.
 */
struct uper_c_source_g_t {
    bool is_a_present;
    bool a;
    bool is_b_present;
    bool b;
    bool is_c_present;
    bool c;
    bool is_d_present;
    bool d;
    bool is_e_present;
    bool e;
    bool is_f_present;
    bool f;
    bool is_g_present;
    bool g;
    bool is_h_present;
    bool h;
    bool is_i_present;
    bool i;
};

/**
 * Type H in module CSource.
 */
struct uper_c_source_h_t {
    uint8_t dummy;
};

/**
 * Type I in module CSource.
 */
struct uper_c_source_i_t {
    uint8_t buf[24];
};

/**
 * Type J in module CSource.
 */
struct uper_c_source_j_t {
    uint8_t length;
    uint8_t buf[23];
};

/**
 * Type K in module CSource.
 */
enum uper_c_source_k_e {
    uper_c_source_k_a_e = 0
};

struct uper_c_source_k_t {
    enum uper_c_source_k_e value;
};

/**
 * Type L in module CSource.
 */
struct uper_c_source_l_t {
    uint32_t length;
    uint8_t buf[500];
};

/**
 * Type O in module CSource.
 */
struct uper_c_source_o_t {
    uint32_t length;
    bool elements[260];
};

/**
 * Type N in module CSource.
 */
struct uper_c_source_n_t {
    struct uper_c_source_k_t a;
    struct uper_c_source_a_t b;
    struct uper_c_source_o_t c;
};

/**
 * Type M in module CSource.
 */
struct uper_c_source_m_t {
    struct uper_c_source_k_t a;
    struct uper_c_source_n_t b;
};

/**
 * Type P in module CSource.
 */
struct uper_c_source_p_t {
    struct uper_c_source_a_t a;
    struct uper_c_source_m_t b;
    struct uper_c_source_f_t c;
};

/**
 * Type R in module CSource.
 */
struct uper_c_source_r_t {
    int8_t value;
};

/**
 * Type REFERENCED-INT in module CRef.
 */
struct uper_c_ref_referenced_int_t {
    uint8_t value;
};

/**
 * Type S in module CSource.
 */
struct uper_c_source_s_t {
    int8_t value;
};

/**
 * Type T in module CSource.
 */
struct uper_c_source_t_t {
    int8_t value;
};

/**
 * Type U in module CSource.
 */
struct uper_c_source_u_t {
    int8_t value;
};

/**
 * Type V in module CSource.
 */
struct uper_c_source_v_t {
    int8_t value;
};

/**
 * Type W in module CSource.
 */
struct uper_c_source_w_t {
    int16_t value;
};

/**
 * Type X in module CSource.
 */
struct uper_c_source_x_t {
    int16_t value;
};

/**
 * Type Y in module CSource.
 */
struct uper_c_source_y_t {
    uint16_t value;
};

/**
 * Type Z in module CSource.
 */
struct uper_c_source_z_t {
    bool value;
};

/**
 * Encode type A defined in module CSource.
 *
 * @param[out] dst_p Buffer to encode into.
 * @param[in] size Size of dst_p.
 * @param[in] src_p Data to encode.
 *
 * @return Encoded data length or negative error code.
 */
ssize_t uper_c_source_a_encode(
    uint8_t *dst_p,
    size_t size,
    const struct uper_c_source_a_t *src_p);

/**
 * Decode type A defined in module CSource.
 *
 * @param[out] dst_p Decoded data.
 * @param[in] src_p Data to decode.
 * @param[in] size Size of src_p.
 *
 * @return Number of bytes decoded or negative error code.
 */
ssize_t uper_c_source_a_decode(
    struct uper_c_source_a_t *dst_p,
    const uint8_t *src_p,
    size_t size);

/**
 * Encode type AB defined in module CSource.
 *
 * @param[out] dst_p Buffer to encode into.
 * @param[in] size Size of dst_p.
 * @param[in] src_p Data to encode.
 *
 * @return Encoded data length or negative error code.
 */
ssize_t uper_c_source_ab_encode(
    uint8_t *dst_p,
    size_t size,
    const struct uper_c_source_ab_t *src_p);

/**
 * Decode type AB defined in module CSource.
 *
 * @param[out] dst_p Decoded data.
 * @param[in] src_p Data to decode.
 * @param[in] size Size of src_p.
 *
 * @return Number of bytes decoded or negative error code.
 */
ssize_t uper_c_source_ab_decode(
    struct uper_c_source_ab_t *dst_p,
    const uint8_t *src_p,
    size_t size);

/**
 * Encode type Q defined in module CSource.
 *
 * @param[out] dst_p Buffer to encode into.
 * @param[in] size Size of dst_p.
 * @param[in] src_p Data to encode.
 *
 * @return Encoded data length or negative error code.
 */
ssize_t uper_c_source_q_encode(
    uint8_t *dst_p,
    size_t size,
    const struct uper_c_source_q_t *src_p);

/**
 * Decode type Q defined in module CSource.
 *
 * @param[out] dst_p Decoded data.
 * @param[in] src_p Data to decode.
 * @param[in] size Size of src_p.
 *
 * @return Number of bytes decoded or negative error code.
 */
ssize_t uper_c_source_q_decode(
    struct uper_c_source_q_t *dst_p,
    const uint8_t *src_p,
    size_t size);

/**
 * Encode type D defined in module CSource.
 *
 * @param[out] dst_p Buffer to encode into.
 * @param[in] size Size of dst_p.
 * @param[in] src_p Data to encode.
 *
 * @return Encoded data length or negative error code.
 */
ssize_t uper_c_source_d_encode(
    uint8_t *dst_p,
    size_t size,
    const struct uper_c_source_d_t *src_p);

/**
 * Decode type D defined in module CSource.
 *
 * @param[out] dst_p Decoded data.
 * @param[in] src_p Data to decode.
 * @param[in] size Size of src_p.
 *
 * @return Number of bytes decoded or negative error code.
 */
ssize_t uper_c_source_d_decode(
    struct uper_c_source_d_t *dst_p,
    const uint8_t *src_p,
    size_t size);

/**
 * Encode type AC defined in module CSource.
 *
 * @param[out] dst_p Buffer to encode into.
 * @param[in] size Size of dst_p.
 * @param[in] src_p Data to encode.
 *
 * @return Encoded data length or negative error code.
 */
ssize_t uper_c_source_ac_encode(
    uint8_t *dst_p,
    size_t size,
    const struct uper_c_source_ac_t *src_p);

/**
 * Decode type AC defined in module CSource.
 *
 * @param[out] dst_p Decoded data.
 * @param[in] src_p Data to decode.
 * @param[in] size Size of src_p.
 *
 * @return Number of bytes decoded or negative error code.
 */
ssize_t uper_c_source_ac_decode(
    struct uper_c_source_ac_t *dst_p,
    const uint8_t *src_p,
    size_t size);

/**
 * Encode type AD defined in module CSource.
 *
 * @param[out] dst_p Buffer to encode into.
 * @param[in] size Size of dst_p.
 * @param[in] src_p Data to encode.
 *
 * @return Encoded data length or negative error code.
 */
ssize_t uper_c_source_ad_encode(
    uint8_t *dst_p,
    size_t size,
    const struct uper_c_source_ad_t *src_p);

/**
 * Decode type AD defined in module CSource.
 *
 * @param[out] dst_p Decoded data.
 * @param[in] src_p Data to decode.
 * @param[in] size Size of src_p.
 *
 * @return Number of bytes decoded or negative error code.
 */
ssize_t uper_c_source_ad_decode(
    struct uper_c_source_ad_t *dst_p,
    const uint8_t *src_p,
    size_t size);

/**
 * Encode type AE defined in module CSource.
 *
 * @param[out] dst_p Buffer to encode into.
 * @param[in] size Size of dst_p.
 * @param[in] src_p Data to encode.
 *
 * @return Encoded data length or negative error code.
 */
ssize_t uper_c_source_ae_encode(
    uint8_t *dst_p,
    size_t size,
    const struct uper_c_source_ae_t *src_p);

/**
 * Decode type AE defined in module CSource.
 *
 * @param[out] dst_p Decoded data.
 * @param[in] src_p Data to decode.
 * @param[in] size Size of src_p.
 *
 * @return Number of bytes decoded or negative error code.
 */
ssize_t uper_c_source_ae_decode(
    struct uper_c_source_ae_t *dst_p,
    const uint8_t *src_p,
    size_t size);

/**
 * Encode type AH defined in module CSource.
 *
 * @param[out] dst_p Buffer to encode into.
 * @param[in] size Size of dst_p.
 * @param[in] src_p Data to encode.
 *
 * @return Encoded data length or negative error code.
 */
ssize_t uper_c_source_ah_encode(
    uint8_t *dst_p,
    size_t size,
    const struct uper_c_source_ah_t *src_p);

/**
 * Decode type AH defined in module CSource.
 *
 * @param[out] dst_p Decoded data.
 * @param[in] src_p Data to decode.
 * @param[in] size Size of src_p.
 *
 * @return Number of bytes decoded or negative error code.
 */
ssize_t uper_c_source_ah_decode(
    struct uper_c_source_ah_t *dst_p,
    const uint8_t *src_p,
    size_t size);

/**
 * Encode type AF defined in module CSource.
 *
 * @param[out] dst_p Buffer to encode into.
 * @param[in] size Size of dst_p.
 * @param[in] src_p Data to encode.
 *
 * @return Encoded data length or negative error code.
 */
ssize_t uper_c_source_af_encode(
    uint8_t *dst_p,
    size_t size,
    const struct uper_c_source_af_t *src_p);

/**
 * Decode type AF defined in module CSource.
 *
 * @param[out] dst_p Decoded data.
 * @param[in] src_p Data to decode.
 * @param[in] size Size of src_p.
 *
 * @return Number of bytes decoded or negative error code.
 */
ssize_t uper_c_source_af_decode(
    struct uper_c_source_af_t *dst_p,
    const uint8_t *src_p,
    size_t size);

/**
 * Encode type AG defined in module CSource.
 *
 * @param[out] dst_p Buffer to encode into.
 * @param[in] size Size of dst_p.
 * @param[in] src_p Data to encode.
 *
 * @return Encoded data length or negative error code.
 */
ssize_t uper_c_source_ag_encode(
    uint8_t *dst_p,
    size_t size,
    const struct uper_c_source_ag_t *src_p);

/**
 * Decode type AG defined in module CSource.
 *
 * @param[out] dst_p Decoded data.
 * @param[in] src_p Data to decode.
 * @param[in] size Size of src_p.
 *
 * @return Number of bytes decoded or negative error code.
 */
ssize_t uper_c_source_ag_decode(
    struct uper_c_source_ag_t *dst_p,
    const uint8_t *src_p,
    size_t size);

/**
 * Encode type AJ defined in module CSource.
 *
 * @param[out] dst_p Buffer to encode into.
 * @param[in] size Size of dst_p.
 * @param[in] src_p Data to encode.
 *
 * @return Encoded data length or negative error code.
 */
ssize_t uper_c_source_aj_encode(
    uint8_t *dst_p,
    size_t size,
    const struct uper_c_source_aj_t *src_p);

/**
 * Decode type AJ defined in module CSource.
 *
 * @param[out] dst_p Decoded data.
 * @param[in] src_p Data to decode.
 * @param[in] size Size of src_p.
 *
 * @return Number of bytes decoded or negative error code.
 */
ssize_t uper_c_source_aj_decode(
    struct uper_c_source_aj_t *dst_p,
    const uint8_t *src_p,
    size_t size);

/**
 * Encode type AK defined in module CSource.
 *
 * @param[out] dst_p Buffer to encode into.
 * @param[in] size Size of dst_p.
 * @param[in] src_p Data to encode.
 *
 * @return Encoded data length or negative error code.
 */
ssize_t uper_c_source_ak_encode(
    uint8_t *dst_p,
    size_t size,
    const struct uper_c_source_ak_t *src_p);

/**
 * Decode type AK defined in module CSource.
 *
 * @param[out] dst_p Decoded data.
 * @param[in] src_p Data to decode.
 * @param[in] size Size of src_p.
 *
 * @return Number of bytes decoded or negative error code.
 */
ssize_t uper_c_source_ak_decode(
    struct uper_c_source_ak_t *dst_p,
    const uint8_t *src_p,
    size_t size);

/**
 * Encode type AI defined in module CSource.
 *
 * @param[out] dst_p Buffer to encode into.
 * @param[in] size Size of dst_p.
 * @param[in] src_p Data to encode.
 *
 * @return Encoded data length or negative error code.
 */
ssize_t uper_c_source_ai_encode(
    uint8_t *dst_p,
    size_t size,
    const struct uper_c_source_ai_t *src_p);

/**
 * Decode type AI defined in module CSource.
 *
 * @param[out] dst_p Decoded data.
 * @param[in] src_p Data to decode.
 * @param[in] size Size of src_p.
 *
 * @return Number of bytes decoded or negative error code.
 */
ssize_t uper_c_source_ai_decode(
    struct uper_c_source_ai_t *dst_p,
    const uint8_t *src_p,
    size_t size);

/**
 * Encode type AL defined in module CSource.
 *
 * @param[out] dst_p Buffer to encode into.
 * @param[in] size Size of dst_p.
 * @param[in] src_p Data to encode.
 *
 * @return Encoded data length or negative error code.
 */
ssize_t uper_c_source_al_encode(
    uint8_t *dst_p,
    size_t size,
    const struct uper_c_source_al_t *src_p);

/**
 * Decode type AL defined in module CSource.
 *
 * @param[out] dst_p Decoded data.
 * @param[in] src_p Data to decode.
 * @param[in] size Size of src_p.
 *
 * @return Number of bytes decoded or negative error code.
 */
ssize_t uper_c_source_al_decode(
    struct uper_c_source_al_t *dst_p,
    const uint8_t *src_p,
    size_t size);

/**
 * Encode type AM defined in module CSource.
 *
 * @param[out] dst_p Buffer to encode into.
 * @param[in] size Size of dst_p.
 * @param[in] src_p Data to encode.
 *
 * @return Encoded data length or negative error code.
 */
ssize_t uper_c_source_am_encode(
    uint8_t *dst_p,
    size_t size,
    const struct uper_c_source_am_t *src_p);

/**
 * Decode type AM defined in module CSource.
 *
 * @param[out] dst_p Decoded data.
 * @param[in] src_p Data to decode.
 * @param[in] size Size of src_p.
 *
 * @return Number of bytes decoded or negative error code.
 */
ssize_t uper_c_source_am_decode(
    struct uper_c_source_am_t *dst_p,
    const uint8_t *src_p,
    size_t size);

/**
 * Encode type AN defined in module CSource.
 *
 * @param[out] dst_p Buffer to encode into.
 * @param[in] size Size of dst_p.
 * @param[in] src_p Data to encode.
 *
 * @return Encoded data length or negative error code.
 */
ssize_t uper_c_source_an_encode(
    uint8_t *dst_p,
    size_t size,
    const struct uper_c_source_an_t *src_p);

/**
 * Decode type AN defined in module CSource.
 *
 * @param[out] dst_p Decoded data.
 * @param[in] src_p Data to decode.
 * @param[in] size Size of src_p.
 *
 * @return Number of bytes decoded or negative error code.
 */
ssize_t uper_c_source_an_decode(
    struct uper_c_source_an_t *dst_p,
    const uint8_t *src_p,
    size_t size);

/**
 * Encode type AO defined in module CSource.
 *
 * @param[out] dst_p Buffer to encode into.
 * @param[in] size Size of dst_p.
 * @param[in] src_p Data to encode.
 *
 * @return Encoded data length or negative error code.
 */
ssize_t uper_c_source_ao_encode(
    uint8_t *dst_p,
    size_t size,
    const struct uper_c_source_ao_t *src_p);

/**
 * Decode type AO defined in module CSource.
 *
 * @param[out] dst_p Decoded data.
 * @param[in] src_p Data to decode.
 * @param[in] size Size of src_p.
 *
 * @return Number of bytes decoded or negative error code.
 */
ssize_t uper_c_source_ao_decode(
    struct uper_c_source_ao_t *dst_p,
    const uint8_t *src_p,
    size_t size);

/**
 * Encode type REFERENCED-SEQUENCE defined in module CRef.
 *
 * @param[out] dst_p Buffer to encode into.
 * @param[in] size Size of dst_p.
 * @param[in] src_p Data to encode.
 *
 * @return Encoded data length or negative error code.
 */
ssize_t uper_c_ref_referenced_sequence_encode(
    uint8_t *dst_p,
    size_t size,
    const struct uper_c_ref_referenced_sequence_t *src_p);

/**
 * Decode type REFERENCED-SEQUENCE defined in module CRef.
 *
 * @param[out] dst_p Decoded data.
 * @param[in] src_p Data to decode.
 * @param[in] size Size of src_p.
 *
 * @return Number of bytes decoded or negative error code.
 */
ssize_t uper_c_ref_referenced_sequence_decode(
    struct uper_c_ref_referenced_sequence_t *dst_p,
    const uint8_t *src_p,
    size_t size);

/**
 * Encode type REFERENCED-ENUM defined in module CRef.
 *
 * @param[out] dst_p Buffer to encode into.
 * @param[in] size Size of dst_p.
 * @param[in] src_p Data to encode.
 *
 * @return Encoded data length or negative error code.
 */
ssize_t uper_c_ref_referenced_enum_encode(
    uint8_t *dst_p,
    size_t size,
    const struct uper_c_ref_referenced_enum_t *src_p);

/**
 * Decode type REFERENCED-ENUM defined in module CRef.
 *
 * @param[out] dst_p Decoded data.
 * @param[in] src_p Data to decode.
 * @param[in] size Size of src_p.
 *
 * @return Number of bytes decoded or negative error code.
 */
ssize_t uper_c_ref_referenced_enum_decode(
    struct uper_c_ref_referenced_enum_t *dst_p,
    const uint8_t *src_p,
    size_t size);

/**
 * Encode type AP defined in module CSource.
 *
 * @param[out] dst_p Buffer to encode into.
 * @param[in] size Size of dst_p.
 * @param[in] src_p Data to encode.
 *
 * @return Encoded data length or negative error code.
 */
ssize_t uper_c_source_ap_encode(
    uint8_t *dst_p,
    size_t size,
    const struct uper_c_source_ap_t *src_p);

/**
 * Decode type AP defined in module CSource.
 *
 * @param[out] dst_p Decoded data.
 * @param[in] src_p Data to decode.
 * @param[in] size Size of src_p.
 *
 * @return Number of bytes decoded or negative error code.
 */
ssize_t uper_c_source_ap_decode(
    struct uper_c_source_ap_t *dst_p,
    const uint8_t *src_p,
    size_t size);

/**
 * Encode type AQ defined in module CSource.
 *
 * @param[out] dst_p Buffer to encode into.
 * @param[in] size Size of dst_p.
 * @param[in] src_p Data to encode.
 *
 * @return Encoded data length or negative error code.
 */
ssize_t uper_c_source_aq_encode(
    uint8_t *dst_p,
    size_t size,
    const struct uper_c_source_aq_t *src_p);

/**
 * Decode type AQ defined in module CSource.
 *
 * @param[out] dst_p Decoded data.
 * @param[in] src_p Data to decode.
 * @param[in] size Size of src_p.
 *
 * @return Number of bytes decoded or negative error code.
 */
ssize_t uper_c_source_aq_decode(
    struct uper_c_source_aq_t *dst_p,
    const uint8_t *src_p,
    size_t size);

/**
 * Encode type AR defined in module CSource.
 *
 * @param[out] dst_p Buffer to encode into.
 * @param[in] size Size of dst_p.
 * @param[in] src_p Data to encode.
 *
 * @return Encoded data length or negative error code.
 */
ssize_t uper_c_source_ar_encode(
    uint8_t *dst_p,
    size_t size,
    const struct uper_c_source_ar_t *src_p);

/**
 * Decode type AR defined in module CSource.
 *
 * @param[out] dst_p Decoded data.
 * @param[in] src_p Data to decode.
 * @param[in] size Size of src_p.
 *
 * @return Number of bytes decoded or negative error code.
 */
ssize_t uper_c_source_ar_decode(
    struct uper_c_source_ar_t *dst_p,
    const uint8_t *src_p,
    size_t size);

/**
 * Encode type AS defined in module CSource.
 *
 * @param[out] dst_p Buffer to encode into.
 * @param[in] size Size of dst_p.
 * @param[in] src_p Data to encode.
 *
 * @return Encoded data length or negative error code.
 */
ssize_t uper_c_source_as_encode(
    uint8_t *dst_p,
    size_t size,
    const struct uper_c_source_as_t *src_p);

/**
 * Decode type AS defined in module CSource.
 *
 * @param[out] dst_p Decoded data.
 * @param[in] src_p Data to decode.
 * @param[in] size Size of src_p.
 *
 * @return Number of bytes decoded or negative error code.
 */
ssize_t uper_c_source_as_decode(
    struct uper_c_source_as_t *dst_p,
    const uint8_t *src_p,
    size_t size);

/**
 * Encode type AT defined in module CRef.
 *
 * @param[out] dst_p Buffer to encode into.
 * @param[in] size Size of dst_p.
 * @param[in] src_p Data to encode.
 *
 * @return Encoded data length or negative error code.
 */
ssize_t uper_c_ref_at_encode(
    uint8_t *dst_p,
    size_t size,
    const struct uper_c_ref_at_t *src_p);

/**
 * Decode type AT defined in module CRef.
 *
 * @param[out] dst_p Decoded data.
 * @param[in] src_p Data to decode.
 * @param[in] size Size of src_p.
 *
 * @return Number of bytes decoded or negative error code.
 */
ssize_t uper_c_ref_at_decode(
    struct uper_c_ref_at_t *dst_p,
    const uint8_t *src_p,
    size_t size);

/**
 * Encode type AT defined in module CSource.
 *
 * @param[out] dst_p Buffer to encode into.
 * @param[in] size Size of dst_p.
 * @param[in] src_p Data to encode.
 *
 * @return Encoded data length or negative error code.
 */
ssize_t uper_c_source_at_encode(
    uint8_t *dst_p,
    size_t size,
    const struct uper_c_source_at_t *src_p);

/**
 * Decode type AT defined in module CSource.
 *
 * @param[out] dst_p Decoded data.
 * @param[in] src_p Data to decode.
 * @param[in] size Size of src_p.
 *
 * @return Number of bytes decoded or negative error code.
 */
ssize_t uper_c_source_at_decode(
    struct uper_c_source_at_t *dst_p,
    const uint8_t *src_p,
    size_t size);

/**
 * Encode type AU defined in module CRef.
 *
 * @param[out] dst_p Buffer to encode into.
 * @param[in] size Size of dst_p.
 * @param[in] src_p Data to encode.
 *
 * @return Encoded data length or negative error code.
 */
ssize_t uper_c_ref_au_encode(
    uint8_t *dst_p,
    size_t size,
    const struct uper_c_ref_au_t *src_p);

/**
 * Decode type AU defined in module CRef.
 *
 * @param[out] dst_p Decoded data.
 * @param[in] src_p Data to decode.
 * @param[in] size Size of src_p.
 *
 * @return Number of bytes decoded or negative error code.
 */
ssize_t uper_c_ref_au_decode(
    struct uper_c_ref_au_t *dst_p,
    const uint8_t *src_p,
    size_t size);

/**
 * Encode type B defined in module CSource.
 *
 * @param[out] dst_p Buffer to encode into.
 * @param[in] size Size of dst_p.
 * @param[in] src_p Data to encode.
 *
 * @return Encoded data length or negative error code.
 */
ssize_t uper_c_source_b_encode(
    uint8_t *dst_p,
    size_t size,
    const struct uper_c_source_b_t *src_p);

/**
 * Decode type B defined in module CSource.
 *
 * @param[out] dst_p Decoded data.
 * @param[in] src_p Data to decode.
 * @param[in] size Size of src_p.
 *
 * @return Number of bytes decoded or negative error code.
 */
ssize_t uper_c_source_b_decode(
    struct uper_c_source_b_t *dst_p,
    const uint8_t *src_p,
    size_t size);

/**
 * Encode type C defined in module CSource.
 *
 * @param[out] dst_p Buffer to encode into.
 * @param[in] size Size of dst_p.
 * @param[in] src_p Data to encode.
 *
 * @return Encoded data length or negative error code.
 */
ssize_t uper_c_source_c_encode(
    uint8_t *dst_p,
    size_t size,
    const struct uper_c_source_c_t *src_p);

/**
 * Decode type C defined in module CSource.
 *
 * @param[out] dst_p Decoded data.
 * @param[in] src_p Data to decode.
 * @param[in] size Size of src_p.
 *
 * @return Number of bytes decoded or negative error code.
 */
ssize_t uper_c_source_c_decode(
    struct uper_c_source_c_t *dst_p,
    const uint8_t *src_p,
    size_t size);

/**
 * Encode type E defined in module CSource.
 *
 * @param[out] dst_p Buffer to encode into.
 * @param[in] size Size of dst_p.
 * @param[in] src_p Data to encode.
 *
 * @return Encoded data length or negative error code.
 */
ssize_t uper_c_source_e_encode(
    uint8_t *dst_p,
    size_t size,
    const struct uper_c_source_e_t *src_p);

/**
 * Decode type E defined in module CSource.
 *
 * @param[out] dst_p Decoded data.
 * @param[in] src_p Data to decode.
 * @param[in] size Size of src_p.
 *
 * @return Number of bytes decoded or negative error code.
 */
ssize_t uper_c_source_e_decode(
    struct uper_c_source_e_t *dst_p,
    const uint8_t *src_p,
    size_t size);

/**
 * Encode type F defined in module CSource.
 *
 * @param[out] dst_p Buffer to encode into.
 * @param[in] size Size of dst_p.
 * @param[in] src_p Data to encode.
 *
 * @return Encoded data length or negative error code.
 */
ssize_t uper_c_source_f_encode(
    uint8_t *dst_p,
    size_t size,
    const struct uper_c_source_f_t *src_p);

/**
 * Decode type F defined in module CSource.
 *
 * @param[out] dst_p Decoded data.
 * @param[in] src_p Data to decode.
 * @param[in] size Size of src_p.
 *
 * @return Number of bytes decoded or negative error code.
 */
ssize_t uper_c_source_f_decode(
    struct uper_c_source_f_t *dst_p,
    const uint8_t *src_p,
    size_t size);

/**
 * Encode type G defined in module CSource.
 *
 * @param[out] dst_p Buffer to encode into.
 * @param[in] size Size of dst_p.
 * @param[in] src_p Data to encode.
 *
 * @return Encoded data length or negative error code.
 */
ssize_t uper_c_source_g_encode(
    uint8_t *dst_p,
    size_t size,
    const struct uper_c_source_g_t *src_p);

/**
 * Decode type G defined in module CSource.
 *
 * @param[out] dst_p Decoded data.
 * @param[in] src_p Data to decode.
 * @param[in] size Size of src_p.
 *
 * @return Number of bytes decoded or negative error code.
 */
ssize_t uper_c_source_g_decode(
    struct uper_c_source_g_t *dst_p,
    const uint8_t *src_p,
    size_t size);

/**
 * Encode type H defined in module CSource.
 *
 * @param[out] dst_p Buffer to encode into.
 * @param[in] size Size of dst_p.
 * @param[in] src_p Data to encode.
 *
 * @return Encoded data length or negative error code.
 */
ssize_t uper_c_source_h_encode(
    uint8_t *dst_p,
    size_t size,
    const struct uper_c_source_h_t *src_p);

/**
 * Decode type H defined in module CSource.
 *
 * @param[out] dst_p Decoded data.
 * @param[in] src_p Data to decode.
 * @param[in] size Size of src_p.
 *
 * @return Number of bytes decoded or negative error code.
 */
ssize_t uper_c_source_h_decode(
    struct uper_c_source_h_t *dst_p,
    const uint8_t *src_p,
    size_t size);

/**
 * Encode type I defined in module CSource.
 *
 * @param[out] dst_p Buffer to encode into.
 * @param[in] size Size of dst_p.
 * @param[in] src_p Data to encode.
 *
 * @return Encoded data length or negative error code.
 */
ssize_t uper_c_source_i_encode(
    uint8_t *dst_p,
    size_t size,
    const struct uper_c_source_i_t *src_p);

/**
 * Decode type I defined in module CSource.
 *
 * @param[out] dst_p Decoded data.
 * @param[in] src_p Data to decode.
 * @param[in] size Size of src_p.
 *
 * @return Number of bytes decoded or negative error code.
 */
ssize_t uper_c_source_i_decode(
    struct uper_c_source_i_t *dst_p,
    const uint8_t *src_p,
    size_t size);

/**
 * Encode type J defined in module CSource.
 *
 * @param[out] dst_p Buffer to encode into.
 * @param[in] size Size of dst_p.
 * @param[in] src_p Data to encode.
 *
 * @return Encoded data length or negative error code.
 */
ssize_t uper_c_source_j_encode(
    uint8_t *dst_p,
    size_t size,
    const struct uper_c_source_j_t *src_p);

/**
 * Decode type J defined in module CSource.
 *
 * @param[out] dst_p Decoded data.
 * @param[in] src_p Data to decode.
 * @param[in] size Size of src_p.
 *
 * @return Number of bytes decoded or negative error code.
 */
ssize_t uper_c_source_j_decode(
    struct uper_c_source_j_t *dst_p,
    const uint8_t *src_p,
    size_t size);

/**
 * Encode type K defined in module CSource.
 *
 * @param[out] dst_p Buffer to encode into.
 * @param[in] size Size of dst_p.
 * @param[in] src_p Data to encode.
 *
 * @return Encoded data length or negative error code.
 */
ssize_t uper_c_source_k_encode(
    uint8_t *dst_p,
    size_t size,
    const struct uper_c_source_k_t *src_p);

/**
 * Decode type K defined in module CSource.
 *
 * @param[out] dst_p Decoded data.
 * @param[in] src_p Data to decode.
 * @param[in] size Size of src_p.
 *
 * @return Number of bytes decoded or negative error code.
 */
ssize_t uper_c_source_k_decode(
    struct uper_c_source_k_t *dst_p,
    const uint8_t *src_p,
    size_t size);

/**
 * Encode type L defined in module CSource.
 *
 * @param[out] dst_p Buffer to encode into.
 * @param[in] size Size of dst_p.
 * @param[in] src_p Data to encode.
 *
 * @return Encoded data length or negative error code.
 */
ssize_t uper_c_source_l_encode(
    uint8_t *dst_p,
    size_t size,
    const struct uper_c_source_l_t *src_p);

/**
 * Decode type L defined in module CSource.
 *
 * @param[out] dst_p Decoded data.
 * @param[in] src_p Data to decode.
 * @param[in] size Size of src_p.
 *
 * @return Number of bytes decoded or negative error code.
 */
ssize_t uper_c_source_l_decode(
    struct uper_c_source_l_t *dst_p,
    const uint8_t *src_p,
    size_t size);

/**
 * Encode type O defined in module CSource.
 *
 * @param[out] dst_p Buffer to encode into.
 * @param[in] size Size of dst_p.
 * @param[in] src_p Data to encode.
 *
 * @return Encoded data length or negative error code.
 */
ssize_t uper_c_source_o_encode(
    uint8_t *dst_p,
    size_t size,
    const struct uper_c_source_o_t *src_p);

/**
 * Decode type O defined in module CSource.
 *
 * @param[out] dst_p Decoded data.
 * @param[in] src_p Data to decode.
 * @param[in] size Size of src_p.
 *
 * @return Number of bytes decoded or negative error code.
 */
ssize_t uper_c_source_o_decode(
    struct uper_c_source_o_t *dst_p,
    const uint8_t *src_p,
    size_t size);

/**
 * Encode type N defined in module CSource.
 *
 * @param[out] dst_p Buffer to encode into.
 * @param[in] size Size of dst_p.
 * @param[in] src_p Data to encode.
 *
 * @return Encoded data length or negative error code.
 */
ssize_t uper_c_source_n_encode(
    uint8_t *dst_p,
    size_t size,
    const struct uper_c_source_n_t *src_p);

/**
 * Decode type N defined in module CSource.
 *
 * @param[out] dst_p Decoded data.
 * @param[in] src_p Data to decode.
 * @param[in] size Size of src_p.
 *
 * @return Number of bytes decoded or negative error code.
 */
ssize_t uper_c_source_n_decode(
    struct uper_c_source_n_t *dst_p,
    const uint8_t *src_p,
    size_t size);

/**
 * Encode type M defined in module CSource.
 *
 * @param[out] dst_p Buffer to encode into.
 * @param[in] size Size of dst_p.
 * @param[in] src_p Data to encode.
 *
 * @return Encoded data length or negative error code.
 */
ssize_t uper_c_source_m_encode(
    uint8_t *dst_p,
    size_t size,
    const struct uper_c_source_m_t *src_p);

/**
 * Decode type M defined in module CSource.
 *
 * @param[out] dst_p Decoded data.
 * @param[in] src_p Data to decode.
 * @param[in] size Size of src_p.
 *
 * @return Number of bytes decoded or negative error code.
 */
ssize_t uper_c_source_m_decode(
    struct uper_c_source_m_t *dst_p,
    const uint8_t *src_p,
    size_t size);

/**
 * Encode type P defined in module CSource.
 *
 * @param[out] dst_p Buffer to encode into.
 * @param[in] size Size of dst_p.
 * @param[in] src_p Data to encode.
 *
 * @return Encoded data length or negative error code.
 */
ssize_t uper_c_source_p_encode(
    uint8_t *dst_p,
    size_t size,
    const struct uper_c_source_p_t *src_p);

/**
 * Decode type P defined in module CSource.
 *
 * @param[out] dst_p Decoded data.
 * @param[in] src_p Data to decode.
 * @param[in] size Size of src_p.
 *
 * @return Number of bytes decoded or negative error code.
 */
ssize_t uper_c_source_p_decode(
    struct uper_c_source_p_t *dst_p,
    const uint8_t *src_p,
    size_t size);

/**
 * Encode type R defined in module CSource.
 *
 * @param[out] dst_p Buffer to encode into.
 * @param[in] size Size of dst_p.
 * @param[in] src_p Data to encode.
 *
 * @return Encoded data length or negative error code.
 */
ssize_t uper_c_source_r_encode(
    uint8_t *dst_p,
    size_t size,
    const struct uper_c_source_r_t *src_p);

/**
 * Decode type R defined in module CSource.
 *
 * @param[out] dst_p Decoded data.
 * @param[in] src_p Data to decode.
 * @param[in] size Size of src_p.
 *
 * @return Number of bytes decoded or negative error code.
 */
ssize_t uper_c_source_r_decode(
    struct uper_c_source_r_t *dst_p,
    const uint8_t *src_p,
    size_t size);

/**
 * Encode type REFERENCED-INT defined in module CRef.
 *
 * @param[out] dst_p Buffer to encode into.
 * @param[in] size Size of dst_p.
 * @param[in] src_p Data to encode.
 *
 * @return Encoded data length or negative error code.
 */
ssize_t uper_c_ref_referenced_int_encode(
    uint8_t *dst_p,
    size_t size,
    const struct uper_c_ref_referenced_int_t *src_p);

/**
 * Decode type REFERENCED-INT defined in module CRef.
 *
 * @param[out] dst_p Decoded data.
 * @param[in] src_p Data to decode.
 * @param[in] size Size of src_p.
 *
 * @return Number of bytes decoded or negative error code.
 */
ssize_t uper_c_ref_referenced_int_decode(
    struct uper_c_ref_referenced_int_t *dst_p,
    const uint8_t *src_p,
    size_t size);

/**
 * Encode type S defined in module CSource.
 *
 * @param[out] dst_p Buffer to encode into.
 * @param[in] size Size of dst_p.
 * @param[in] src_p Data to encode.
 *
 * @return Encoded data length or negative error code.
 */
ssize_t uper_c_source_s_encode(
    uint8_t *dst_p,
    size_t size,
    const struct uper_c_source_s_t *src_p);

/**
 * Decode type S defined in module CSource.
 *
 * @param[out] dst_p Decoded data.
 * @param[in] src_p Data to decode.
 * @param[in] size Size of src_p.
 *
 * @return Number of bytes decoded or negative error code.
 */
ssize_t uper_c_source_s_decode(
    struct uper_c_source_s_t *dst_p,
    const uint8_t *src_p,
    size_t size);

/**
 * Encode type T defined in module CSource.
 *
 * @param[out] dst_p Buffer to encode into.
 * @param[in] size Size of dst_p.
 * @param[in] src_p Data to encode.
 *
 * @return Encoded data length or negative error code.
 */
ssize_t uper_c_source_t_encode(
    uint8_t *dst_p,
    size_t size,
    const struct uper_c_source_t_t *src_p);

/**
 * Decode type T defined in module CSource.
 *
 * @param[out] dst_p Decoded data.
 * @param[in] src_p Data to decode.
 * @param[in] size Size of src_p.
 *
 * @return Number of bytes decoded or negative error code.
 */
ssize_t uper_c_source_t_decode(
    struct uper_c_source_t_t *dst_p,
    const uint8_t *src_p,
    size_t size);

/**
 * Encode type U defined in module CSource.
 *
 * @param[out] dst_p Buffer to encode into.
 * @param[in] size Size of dst_p.
 * @param[in] src_p Data to encode.
 *
 * @return Encoded data length or negative error code.
 */
ssize_t uper_c_source_u_encode(
    uint8_t *dst_p,
    size_t size,
    const struct uper_c_source_u_t *src_p);

/**
 * Decode type U defined in module CSource.
 *
 * @param[out] dst_p Decoded data.
 * @param[in] src_p Data to decode.
 * @param[in] size Size of src_p.
 *
 * @return Number of bytes decoded or negative error code.
 */
ssize_t uper_c_source_u_decode(
    struct uper_c_source_u_t *dst_p,
    const uint8_t *src_p,
    size_t size);

/**
 * Encode type V defined in module CSource.
 *
 * @param[out] dst_p Buffer to encode into.
 * @param[in] size Size of dst_p.
 * @param[in] src_p Data to encode.
 *
 * @return Encoded data length or negative error code.
 */
ssize_t uper_c_source_v_encode(
    uint8_t *dst_p,
    size_t size,
    const struct uper_c_source_v_t *src_p);

/**
 * Decode type V defined in module CSource.
 *
 * @param[out] dst_p Decoded data.
 * @param[in] src_p Data to decode.
 * @param[in] size Size of src_p.
 *
 * @return Number of bytes decoded or negative error code.
 */
ssize_t uper_c_source_v_decode(
    struct uper_c_source_v_t *dst_p,
    const uint8_t *src_p,
    size_t size);

/**
 * Encode type W defined in module CSource.
 *
 * @param[out] dst_p Buffer to encode into.
 * @param[in] size Size of dst_p.
 * @param[in] src_p Data to encode.
 *
 * @return Encoded data length or negative error code.
 */
ssize_t uper_c_source_w_encode(
    uint8_t *dst_p,
    size_t size,
    const struct uper_c_source_w_t *src_p);

/**
 * Decode type W defined in module CSource.
 *
 * @param[out] dst_p Decoded data.
 * @param[in] src_p Data to decode.
 * @param[in] size Size of src_p.
 *
 * @return Number of bytes decoded or negative error code.
 */
ssize_t uper_c_source_w_decode(
    struct uper_c_source_w_t *dst_p,
    const uint8_t *src_p,
    size_t size);

/**
 * Encode type X defined in module CSource.
 *
 * @param[out] dst_p Buffer to encode into.
 * @param[in] size Size of dst_p.
 * @param[in] src_p Data to encode.
 *
 * @return Encoded data length or negative error code.
 */
ssize_t uper_c_source_x_encode(
    uint8_t *dst_p,
    size_t size,
    const struct uper_c_source_x_t *src_p);

/**
 * Decode type X defined in module CSource.
 *
 * @param[out] dst_p Decoded data.
 * @param[in] src_p Data to decode.
 * @param[in] size Size of src_p.
 *
 * @return Number of bytes decoded or negative error code.
 */
ssize_t uper_c_source_x_decode(
    struct uper_c_source_x_t *dst_p,
    const uint8_t *src_p,
    size_t size);

/**
 * Encode type Y defined in module CSource.
 *
 * @param[out] dst_p Buffer to encode into.
 * @param[in] size Size of dst_p.
 * @param[in] src_p Data to encode.
 *
 * @return Encoded data length or negative error code.
 */
ssize_t uper_c_source_y_encode(
    uint8_t *dst_p,
    size_t size,
    const struct uper_c_source_y_t *src_p);

/**
 * Decode type Y defined in module CSource.
 *
 * @param[out] dst_p Decoded data.
 * @param[in] src_p Data to decode.
 * @param[in] size Size of src_p.
 *
 * @return Number of bytes decoded or negative error code.
 */
ssize_t uper_c_source_y_decode(
    struct uper_c_source_y_t *dst_p,
    const uint8_t *src_p,
    size_t size);

/**
 * Encode type Z defined in module CSource.
 *
 * @param[out] dst_p Buffer to encode into.
 * @param[in] size Size of dst_p.
 * @param[in] src_p Data to encode.
 *
 * @return Encoded data length or negative error code.
 */
ssize_t uper_c_source_z_encode(
    uint8_t *dst_p,
    size_t size,
    const struct uper_c_source_z_t *src_p);

/**
 * Decode type Z defined in module CSource.
 *
 * @param[out] dst_p Decoded data.
 * @param[in] src_p Data to decode.
 * @param[in] size Size of src_p.
 *
 * @return Number of bytes decoded or negative error code.
 */
ssize_t uper_c_source_z_decode(
    struct uper_c_source_z_t *dst_p,
    const uint8_t *src_p,
    size_t size);

#endif
